{% extends "base.html" %}
{% block title %}首页{% endblock %}
{% block head %}
<link type="text/css" rel="stylesheet" media="screen" href="/stylesheets/main.css" />
{% endblock %}
{% block content %}
<div id="conWrapper">
    <div id="postForm">
        <h2 class="largeFont" id="postTitle"><span id="writeSlogan">你正在干嘛？</span></h2>
        <span id="postCounter" class="postCounterTips" style="color: rgb(179, 179, 179);"><span id="text-counter-count" class="numeric postCounter">140</span></span>
        <form action="/update" method="POST">
            <textarea name="status" id="status" style="border-color: rgb(153, 153, 153);" rows="2" cols="40"></textarea>
            <input type="hidden" id="in_reply_to" name="in_reply_to" />
            <button class="postBtn" id="updateSubmit" type="submit">推！</button>
        </form>
        <span id="lastUpdate" title="{{ me.status.text }}"><strong class="tip3">最近更新：</strong> <span>{{ me.status.text }}</span></span>
    </div>
    <div style="display: none;" id="emaiTips" class="msgBox">
    </div>
    <div class="conSubHeader">
        <h3 id="leftTile" class="title">首页</h3>
        <div class="more">
            <div class="autoupdate-switch-label">自动更新</div>
            <div class="autoupdate-switch" id="autoSwitch">
                <div class="handle">
                </div>
            </div>
        </div>
    </div>
    <div style="display: none;" id="tkyou" class="msgBox">
	<span></span>条新推
    </div>
    <div class="list-wrapper">
        <ol class="lists clearfix" id="timeline">
            {% for item in item_list %}
            {% include "components/status.html" %}
            {% endfor %}
        </ol>
    </div>
	<div class="bottom-nav" id="timelineNav">
		<ul class="pagination pagination-nocalendar clearfix">
			<li class="more-action"><a href="#" class="more-btn more-enable" id="nextButton">更多</a></li>
			<li class="gototop"><a href="#" id="goToTop">回到顶部</a></li>
		</ul>
	</div>
</div>
{% include "components/sidebar.html" %}
{% endblock %}
{% block outbox %}
{% endblock %}
{% block scripts %}
{% include "components/js_config.html" %}
<script type="text/javascript" src="js/home.js"></script>
<script typ="text/javascript">
~function() {
	var filters = "{{ settings.filters }}";
	if (filters !== "") {
		var re = RegExp(filters.split(',').join('|'))
		$('#timeline li .content').each(function(){
			var content = $(this);
			if (re.test(content.text())) {
				content.closest('li').hide();
			}
		});
	}
}();
</script>
{% endblock %}